from django.urls import path, re_path
from rest_framework.routers import DefaultRouter
from . import views

router = DefaultRouter()

urlpatterns = [
    path('hello/', views.HelloView.as_view(), name='hello'),
    path('essays/look/', views.EssayView.as_view(), name='essay_look'),
    path('essays/write/', views.WriteEssayView.as_view(), name='essay_write'),
    re_path(r'essays/admin/(?P<pk>\d+)/$', views.EssayAdminView.as_view(), name='essay_admin'),
    re_path(r'click/(?P<pk>\d+)/$', views.ClickHelloView.as_view({'patch': 'partial_update'}), name='hello_click'),
]
